home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / bash_completion.d / hping2 < prev    next >
Encoding:
Text File  |  2010-11-16  |  1.6 KB  |  56 lines

  1. # bash completion for hping2
  2.  
  3. have hping2 &&
  4. _hping2()
  5. {
  6.     local cur prev
  7.  
  8.     COMPREPLY=()
  9.     cur=`_get_cword`
  10.     prev=`_get_pword`
  11.  
  12.     case $prev in
  13.         -I|--interface)
  14.             _available_interfaces
  15.             return 0
  16.             ;;
  17.         -a|--spoof)
  18.             _known_hosts_real "$cur"
  19.             return 0
  20.             ;;
  21.         -o|--tos)
  22.             COMPREPLY=( $( compgen -W '02 04 08 10' ) )
  23.             return 0
  24.             ;;
  25.         -E|--file)
  26.             _filedir
  27.             return 0
  28.             ;;
  29.     esac
  30.  
  31.     if [[ "$cur" == -* ]]; then
  32.         COMPREPLY=( $( compgen -W '--help --version --count --interval --fast \
  33.             --faster --numeric --quiet --interface --verbose --debug --bind \
  34.             --unbind --rawip --icmp --upd --scan --listen --spoof \
  35.             --rand-source --rand-dest --ttl --id --ipproto --winid -rel --frag \
  36.             --morefrag --dontfrag --fragoff --mtu --tos --rroute --icmptype \
  37.             --icmpcode --icmp-ipver --icmp-iphlen --icmp-iplen --icmp-ipid \
  38.             --icmp-ipproto --icmp-cksum --icmp-ts --icmp-addr --baseport \
  39.             --destport --keep --win --tcpoff --tcpseq --tcpack --seqnum \
  40.             --badcksum --tcp-timestamp --fin --syn --rst --push --ack --urg \
  41.             --xmas --ymas --data --file --sign --dump --print --safe --end \
  42.             --traceroute --tr-keep-ttl --tr-stop --tr-no-rtt' -- "$cur" ) )
  43.     else
  44.         _known_hosts_real "$cur"
  45.     fi
  46. } &&
  47. complete -F _hping2 hping2 hping
  48.  
  49. # Local variables:
  50. # mode: shell-script
  51. # sh-basic-offset: 4
  52. # sh-indent-comment: t
  53. # indent-tabs-mode: nil
  54. # End:
  55. # ex: ts=4 sw=4 et filetype=sh
  56.